/* 页面 body 样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #e0f7fa, #bbdefb); /* 渐变背景 */
    width: 400px; /* 设置固定宽度，适合弹出窗口 */
    min-height: 500px;
}

/* 标题样式 */
h1 {
    color: #01579b; /* 深蓝色标题颜色 */
    text-align: center;
    margin-top: 0;
    font-size: 28px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    background: linear-gradient(45deg, #0288d1, #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 输入框和按钮容器样式 */
.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 输入框样式 */
#englishInput, #chineseInput {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    outline: none;
}

#englishInput:focus, #chineseInput:focus {
    border-color: #0288d1;
    box-shadow: 0 0 0 2px rgba(2, 136, 209, 0.2);
}

/* 通用按钮样式 */
button {
    padding: 12px 20px;
    font-size: 16px;
    background: linear-gradient(45deg, #0288d1, #00bcd4);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 按钮悬停样式 */
button:hover {
    background: linear-gradient(45deg, #01579b, #0097a7);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

/* 轮播容器 */
.carousel-container {
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.carousel-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0288d1, #00bcd4, #4caf50);
}

/* 单词显示区域 */
.word-display {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

/* 英文单词显示 */
.english-word {
    font-size: 28px;
    font-weight: 700;
    color: #01579b;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 1px;
}

/* 中文释义显示 */
.chinese-meaning {
    font-size: 20px;
    color: #333;
    display: none;
    text-align: center;
    font-weight: 500;
    padding: 10px 20px;
    background-color: rgba(2, 136, 209, 0.1);
    border-radius: 8px;
    margin-top: 10px;
}

/* 轮播控制按钮容器 */
.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 控制按钮样式 */
.carousel-controls button {
    padding: 10px 18px;
    font-size: 15px;
    flex: 1;
    max-width: 120px;
}

#showChineseBtn {
    background: linear-gradient(45deg, #4caf50, #8bc34a);
}

#showChineseBtn:hover {
    background: linear-gradient(45deg, #388e3c, #689f38);
}

#prevBtn {
    background: linear-gradient(45deg, #ff9800, #ffc107);
}

#prevBtn:hover {
    background: linear-gradient(45deg, #f57c00, #ffa000);
}

/* 进度显示 */
.progress {
    font-size: 16px;
    color: #01579b;
    font-weight: 600;
    background-color: rgba(2, 136, 209, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* 导入导出区域 */
.io-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.io-container button {
    flex: 1;
    max-width: 120px;
    padding: 10px 15px;
    font-size: 14px;
    min-width: 100px;
}

#exportCsvBtn {
    background: linear-gradient(45deg, #9c27b0, #e91e63);
}

#exportCsvBtn:hover {
    background: linear-gradient(45deg, #7b1fa2, #c2185b);
}

#importCsvBtn {
    background: linear-gradient(45deg, #ff5722, #ff9800);
}

#importCsvBtn:hover {
    background: linear-gradient(45deg, #e64a19, #f57c00);
}

/* 单词列表标题 */
.list-title {
    color: #01579b;
    font-size: 20px;
    margin: 20px 0 10px;
    text-align: center;
    font-weight: 600;
}

/* 单词列表样式 */
#wordList {
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 10px;
}

/* 单词列表项样式 */
#wordList li {
    background: linear-gradient(90deg, #ffffff, #f1f8e9);
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #0288d1;
}

#wordList li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 单词项样式 */
.word-item {
    flex: 1;
    font-size: 16px;
}

.word-item strong {
    color: #01579b;
}

/* 单词列表项中的删除按钮样式 */
#wordList button {
    background: linear-gradient(45deg, #f44336, #e53935);
    margin-left: 10px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

/* 单词列表项中的删除按钮悬停样式 */
#wordList button:hover {
    background: linear-gradient(45deg, #d32f2f, #c62828);
    transform: translateY(-1px);
}

/* 滚动条样式 */
#wordList::-webkit-scrollbar {
    width: 6px;
}

#wordList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

#wordList::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #0288d1, #00bcd4);
    border-radius: 10px;
}

/* 响应式调整 */
@media (max-width: 420px) {
    body {
        padding: 15px;
    }
    
    .carousel-container, .input-container {
        padding: 15px;
    }
    
    .carousel-controls {
        gap: 8px;
    }
    
    .carousel-controls button {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .io-container {
        flex-direction: column;
        align-items: center;
    }
    
    .io-container button {
        width: 80%;
        max-width: none;
        margin-bottom: 10px;
    }
}